<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<div id="projectWizard" class="wizard box tabbedBox">
	<div class="header">
		<ul class="steps">
			<li><a class="current" href="#wiz_basicInfo">基本信息</a></li>
			<li><a href="#wiz_files">上传项目文档</a></li>
			<li><a href="#wiz_category">选择归档分类</a></li>

		</ul>
	</div>
	<div style="padding:0" class="content tabbed">
		<div id="wiz_basicInfo">

			<form:form id="formProjectBasicInfo" commandName="model" action="">

				<table class="form-table">
					<tr>
						<td class="td1">项目名称：</td>
						<td class="td2"><form:input path="name" cssClass="required" />
						</td>
						<td class="td1">项目编号：</td>
						<td class="td2"><form:input path="code" cssClass="required" />
						</td>
					</tr>
					<tr>
						<%-- <td class="td1">项目级别：</td>
						<td class="td2"><form:select path="projectLevel"
								cssClass="required" items="${projectLevels }" itemValue="name"
								itemLabel="name" />
						</td> --%>
						<td class="td1">合同编号：</td>
						<td class="td2"><form:input path="contractNo"
								cssClass="required" /></td>
					</tr>

					<tr>
						<td class="td1">项目类型：</td>
						<td class="td2"><form:select path="projectType"
								cssClass="required search" items="${projectTypes }"
								itemValue="name" itemLabel="name" />
						</td>
						<td class="td1">项目状态：</td>
						<td class="td2"><form:select path="status" disabled="true"
								cssClass="required" items="${projectStatus }" itemValue="name"
								itemLabel="name" /></td>
					</tr>
					<tr>
						<td class="td1">项目经理：</td>
						<td class="td2"><form:hidden path="managerId" /> <isperp:departmentUser
								displayValue="${model.managerName }" valueControlId="managerId"
								id="managerName" name="managerName"></isperp:departmentUser></td>

						<td class="td1">销售：</td>
						<td class="td2"><form:hidden path="sellerId" /> <isperp:departmentUser
								displayValue="${model.sellerName }" valueControlId="sellerId"
								id="sellerName" name="sellerName"></isperp:departmentUser>
						</td>
					</tr>

					<tr>
						<td class="td1">开始时间：</td>
						<td class="td2"><form:input path="startDate" type="date"
								cssClass="required maskDate" />
						</td>
						<td class="td1">结束时间：</td>
						<td class="td2"><form:input path="endDate" type="date"
								cssClass="required maskDate" /></td>
					</tr>
					<tr>
						<td class="td1">项目金额：</td>
						<td class="td2" colspan="3"><form:input path="account"
								cssClass="number" />
						</td>
					</tr>
					
					<tr>
						<td class="td1">备注：</td>
						<td class="td2" colspan="3"><form:textarea path="memo" /> </textarea></td>
					</tr>
				</table>


				<table class="form-table">
					<tr>
						<td class="td1">客户名称：</td>
						<td class="td2"><form:hidden path="cusCustomerId" /> <isperp:listSelector
								id="customerSelector" url="customer/customer/list"
								displayValue="${model.cusCustomerName }"
								valueControlId="cusCustomerId">
								<isperp:column name="id" title="id" hidden="true" width="10"></isperp:column>
								<isperp:column name="code" title="编号" width="80">
								</isperp:column>
								<isperp:column name="name" title="名称" width="150">
								</isperp:column>
								<isperp:column name="type" title="类型" width="80">
								</isperp:column>
								<isperp:column name="linkman" title="联系人" width="80">
								</isperp:column>
								<isperp:column name="linktel" title="联系电话" width="80">
								</isperp:column>

							</isperp:listSelector>
						</td>
						<td class="td1">项目地址：</td>
						<td class="td2"><form:input path="projectAddress"
								cssClass="required" /></td>
					</tr>
					<tr>
						<td class="td1">联系人：</td>
						<td class="td2"><form:input path="customerLinkman"
								cssClass="required" />
						</td>
						<td class="td1">联系电话：</td>
						<td class="td2"><form:input path="customerLinktel"
								cssClass="required" />
						</td>
					</tr>
					<tr>
						<td class="td1">邮箱：</td>
						<td class="td2"><form:input path="customerEmail"
								cssClass="required" />
						</td>
					</tr>
					<tr>
						<td class="td1">项目配置项描述（请填写详细的配置项内容）：</td>
						<td colspan="3"><textarea id="projConfDescription"
								name="confDescription" class="editor">${model.confDescription }</textarea>
						</td>
					</tr>
				</table>
			</form:form>
		</div>
		<div id="wiz_files">
			<table class="form-table">
				<tr>
					<td class="td1">附件：
					<td class="td2" colspan="3">(附件包括本项目的招标文件、投标文件、合同等相关文档)<br />
						<isperp:uploader sourceId="${model.id }" id="projectFiles"></isperp:uploader>
					</td>
				</tr>
			</table>
		</div>
		<div id="wiz_category">
			<div class="box no-border" style="padding:10px">

				<form id="formProjectCagetory" action="project/project/finishProject">
					<input type="hidden" name="id" value="${model.id }" /> 请选择项目分类：<input
						type="hidden" id="projCategoryId" name="projCategoryId"
						value="${model.projCategoryId }" />
					<isperp:treeSelector id="selectProjectCategoryId"
						name="projCategoryName" url="project/category/getTree"
						valueControlId="projCategoryId"
						displayValue="${projectCategoryName }"></isperp:treeSelector>
				</form>
			</div>

		</div>
	</div>
	<isperp:wizButtonList buttonListId="bpmConfigWizardBtns">
	</isperp:wizButtonList>
</div>
<script type="text/javascript">
	var projectWizard = isperp.wizard({
		wizardId : "projectWizard"
	});

	var projectWizard_Event0 = function(index, obj) {

	};

	var projectWizard_Event1 = function(index, obj) {

	};

	var projectWizard_Event2 = function(index, obj) {

	};

	var projectWizard_Event3 = function(index, obj) {
		isperp.submitForm({
			formId : "formProjectCagetory",
			success : function() {
				isperp.closeDialog();
			}
		});

	};
</script>